<%--
  Created by IntelliJ IDEA.
  User: 86135
  Date: 2023/3/31
  Time: 13:03
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>会员资料修改</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/semantic.min.css">
    <script src="${pageContext.request.contextPath}/statics/js/semantic.min.js"></script>
    <style>
        body{
            background-image: url("${pageContext.request.contextPath}/statics/images/bg.png");
            font-size: 18px;
        }
    </style>
</head>
<body>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>${userSeeing.getName()}</small>
                </h1>
            </div>
        </div>
    </div>
    <form action="${pageContext.request.contextPath}/admin/updateUser" method="post">
        <div align="center">
            <%--显示头像--%>
            <img src="${pageContext.request.contextPath}/user/readPhoto?username=${userSeeing.getUserName()}" width="100px" height="100px"><br><br>
                帐号：${userSeeing.getUserName()} <br><br>
                昵称：${userSeeing.getName()} <br><br>
            <input type="hidden" name="username" value="${userSeeing.getUserName()}"/>
            <input name="sex" type="radio" value="男" disabled="disabled"<% if (session.getAttribute("sex")==null || ((String)session.getAttribute("sex")).equals("男")){%>
                   checked="checked" <%}%> />男
            <input name="sex" type="radio" value="女" disabled="disabled"<% if (session.getAttribute("sex")!=null && ((String)session.getAttribute("sex")).equals("女")){%>
                   checked="checked" <%}%> />女<br><br>
            生日：${userSeeing.getBirth()} <br><br>
            个性签名：${userSeeing.getSignature()} <br><br>
            余额：<input type="text" name="balance" value="${userSeeing.getBalance()}" style="border-radius: 5px;"/><br><br>
            信誉：<select name="credit">
            <c:forEach var="credit" items="${creditList}">
                <c:choose>
                    <c:when test="${credit eq userSeeing.getCredit()}">
                        <option value="${credit}" selected>${userSeeing.getCredit()}</option>
                    </c:when>
                    <c:otherwise>
                        <option value="${credit}">${credit}</option>
                    </c:otherwise>
                </c:choose>
            </c:forEach>
        </select><br><br>
            <a href="${pageContext.request.contextPath}/comment/listAllCommentsAdmin?username=${userSeeing.getUserName()}">评论查看</a>
            <br><br>
            <input type="submit" value="提交" class="ui primary button"/>
            <input type="button" value="返回" onclick="Return()" class="ui toggle button" style="margin-left: 5%;"/>
        </div>
    </form>

    <script src="${pageContext.request.contextPath}/statics/js/jquery-3.6.0.js"></script>
    <script>
        function Return(){
            window.location = "${pageContext.request.contextPath}/admin/allUser"
        }
    </script>

</div>
